package me.send.data.service.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import me.send.business.base.Pager;
import me.send.data.service.mapper.PayOrderMapper;
import me.send.data.service.pojo.PayOrder;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PayOrderService {
    @Autowired
    private PayOrderMapper payOrderMapper;
    
   
    // 使用分页查询
    public List<PayOrder> list(String phone,
    		Integer status, String start, String end,Integer payWay,Integer payType,Pager page) {
    	Map<String, Object> parameter = new HashMap<String, Object>();
    	parameter.put("phone", phone);
    	parameter.put("status", status);
    	parameter.put("payWay", payWay);
    	parameter.put("payType", payType);
    	parameter.put("start", start);
    	parameter.put("end", end);
    	parameter.put("page", page);
    	List<PayOrder> rows = payOrderMapper.list(parameter);
    	return rows;
    }
    // 查询总数
    public Integer count(String phone,
    		Integer status, String start, String end,Integer payWay,Integer payType) {
    	Map<String, Object> parameter = new HashMap<String, Object>();
    	parameter.put("phone", phone);
    	parameter.put("status", status);
    	parameter.put("payWay", payWay);
    	parameter.put("payType", payType);
    	parameter.put("start", start);
    	parameter.put("end", end);
    	Integer rows = payOrderMapper.count(parameter);
    	return rows;
    }
    
   
}
